package com.java;

public class Test11 {
    public static void main(String[] args) {
        int count = 0;
        int ret = 0;
        for(int i = 1; i <= 100; i++) {
            ret = i;
            while (ret != 0) {
                if (ret % 10 == 9) {
                    count++;
                }
                ret /= 10;
            }
        }
        System.out.println(count);
    }
}
